<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>对象的多态</title>
</head>
<body>
    <script>
        var renderMap = function( map ){
            if ( map.show instanceof Function ){
                map.show();
            }
        };

        var sosoMap = {
            show: function() {
                console.log("开始熏染soso地图");
            }
        };

        renderMap(sosoMap);

    </script>
</body>
</html>